<?php

include "koneksi.php";

$response = array();

	$id_member = $_POST['id_member'];
	$password = $_POST['password'];
	$namalengkap = $_POST['namalengkap'];
	$tanggallahir = $_POST['tanggallahir'];
	$alamat = $_POST['alamat'];
	$jekel = $_POST['jekel'];
	$gol = $_POST['gol'];

    $daftar_member = mysql_query("INSERT INTO daftar (
											id_member, password, namalengkap,
											tanggallahir, jekel, alamat, gol
											)
											VALUES(
											'$id_member', '$password', '$namalengkap',
											'$tanggallahir', '$jekel', '$alamat', '$gol'
											)");

    if ($daftar_member) {

        $response["hasil"] = 1;
        $response["message"] = "Berhasil input";

        echo json_encode($response);
		
    } else {

        $response["hasil"] = 0;
        $response["message"] = "Oops! An error occurred.";
        
        echo json_encode($response);
    }

?>